<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
<title>Uploadify</title> 
<link href="/uploadify/uploadify.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="/uploadify/swfobject.js"></script> 
<script type="text/javascript" src="/uploadify/jquery.uploadify.v2.1.4.min.js"></script> 
<link href="/assets/js/validate/jquery.validate.css" type="text/css" rel="stylesheet"/>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/additional-methods.min.js" type="text/javascript"></script>
<script type="text/javascript"> 
$(document).ready(function() 
{ 
	$(document).ready(function() {
	  $('#file_upload').uploadify({
		'uploader'  : '/uploadify/uploadify.swf',
		'script'    : '/uploadify/uploadify.php',
		'cancelImg' : '/uploadify/cancel.png',
		'folder'    : '/uploads',
		'auto'      : true,
		'removeCompleted' : false,
		'fileExt'        : '*.jpg;*.gif;*.png',
		'fileDesc'       : 'Image Files (.JPG, .GIF, .PNG)',
		'onComplete': function(event, queueID, fileObj, response, data) {
			$('#filesUploaded_preview_img').html(
				'<img src='+fileObj.filePath+' alt="" width="100" height="150"> <input name="preview" type="hidden" value='+fileObj.filePath+'>'
			);
		 },
		
	  });
	});
}); 

    $(function() {
        $("#inputForm").validate({
            submitHandler: function(form) {
                ShowMsg();
                form.submit();
            }
        });
    });

</script> 

<div id="page" class="wrapper w_960 clearfix">
  <h2 class="heading">修改主题 </h2>
  <div id="content" class="col first_col b1">
    <form id="inputForm" action="/admin/booklet/save" method="post">
		<div class="row clearfix">
        <label for="id">id:</label>
        <p><span>
		<input name="id" id="id" value="<?php echo $booklet->id; ?>" readonly="readonly">
      </div>
		
      <div class="row clearfix">
        <label for="name">主题名:</label>
        <p><span>
		<input name="name" maxlength="100" id="name" class="inputs med required" value="<?php echo $booklet->name; ?>">
          </span><span id="NameError"></span></p>
      </div>

	<div class="row clearfix">
      <label for="desc">Description :</label>
      <p><span>
	  <textarea id="description" name="description" class="inputs med long required" rows="10"><?php echo $booklet->description; ?></textarea>
        </span></p>
    </div>

	<div class="row clearfix">
			<label for="preview">缩略图 :</label>
			<input type="file" name="file_upload" id="file_upload" /> 
			<div id="filesUploaded_preview_img">
			</div> 
	  </div>

	  <div class="row clearfix">
        <input type="submit" name="submitBtn" id="submitBtn" class="submit" value="Update">
      </div>
    </form>
  </div>
  <div id="sidebar" class="col last_col b2" style="display: none;">
    <div class="note">
      <h4>Note</h4>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eros lectus, sollicitudin at vestibulum sit amet, elementum et libero. Mauris neque purus, consectetur eget vulputate quis, dapibus ac tortor.</p>
    </div>
  </div>
</div>



